package ar.edu.itba.it.cg.grupo01.game.action;

import ar.edu.itba.it.cg.grupo01.game.BaseGame;
import ar.edu.itba.it.cg.grupo01.game.GameMode;

import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;

public class ResetGameAction extends InputAction {

	private BaseGame game;

	public ResetGameAction(BaseGame baseGame) {
		this.game = baseGame;
	}

	public void performAction(InputActionEvent evt) {
		if (evt.getTriggerPressed()) {

			switch (evt.getTriggerCharacter()) {
			case 'q':
				game.resetGame(GameMode.LAPS);
				break;
			case 'w':
				game.resetGame(GameMode.TIME_ATTACK);
				break;
			}
		}
	}

}
